# ifndef RECTANGLE_H
# define RECTANGLE_H

# include "point.h"
# include <iostream>

using namespace std;

class Rectangle {
    private:
        Point leftTop;
        Point rightBotom;     
   
    public:
        Rectangle(const Point &leftTop, const Point &rightBotom) : leftTop(leftTop), rightBotom(rightBotom) {}
        void printPoints(){
            cout << "leftTop: (" << leftTop.getX() << ", " << leftTop.getY() << ")" << endl;
            cout << "rightBotom: (" << rightBotom.getX() << ", " << rightBotom.getY() << ")" << endl;
        }
        void printArea(){
            double width = rightBotom.getX() - leftTop.getX();
            double height = rightBotom.getY() - leftTop.getY();
            double area = width * height;
            cout << "Area: " << area << endl;
        }
};

#endif